import request from '@/utils/request'
/**
 * 获取课程列表  成功
 * @param {*} params
 * @returns
 */
export const getCourseListApi = (params) => {
  return request({
    url: '/clues/course/list',
    params
  })
}
/**
 *下拉框(课程学科)
 * @returns
 */
export const getSubjectListApi = (subject) => {
  return request({
    url: `/system/dict/data/type/${subject}`
  })
}
/**
 * 课程新增
 * @param {*} data
 * @returns
 */
export const addCourseApi = (data) => {
  return request({
    url: '/clues/course',
    method: 'POST',
    data
  })
}
/**
 * 课程删除
 * @param {*} ids
 * @returns
 */
export const delCourseApi = (ids) => {
  return request({
    url: '/clues/course',
    method: 'DELETE',
    data: {
      ids
    }
  })
}
/**
 * 课程编辑回显
 * @param {*} id
 * @returns
 */
export const getCourseDateApi = (id) => {
  return request({
    url: `/clues/course/${id}`
  })
}
/**
 * 课程修改
 * @param {*} data
 * @returns
 */
export const editCourseApi = (data) => {
  return request({
    url: `/clues/course`,
    method: 'PUT',
    data
  })
}
